package com.ctg.itrdc.imageconsole.util;

import java.io.FileWriter;
import java.io.IOException;

/**
 * 		Author			Date			Operation
 * 		Shizhu.Peng		2017-03-15		create
 */

public class FileIOUtil {
	
	public static String readFromFile(String filePath) {
		return null;
	}
	
	public static void writeToFile(String string, String filePath){		
		FileWriter fileWriter = null;
		try {
			fileWriter = new FileWriter(filePath);
			fileWriter.write(string);			
		} catch (IOException e) {
			throw new RuntimeException("Error : writing string to file : " + e.getMessage());
		} finally {
			if(null != fileWriter)
				try {
					fileWriter.close();
				} catch (IOException e) {					
				}
		}
	}
	
}
